<!DOCTYPE html>
<html>
    <head>
        <title></title>
   <%@ include file="includeAndamios.jsp" %>
  <%@ include file="include_grid.jsp" %>  
  
  <script type="text/javascript">
	 $(function() {
		  $("#tabs").tabs();
		  $("#fechaInicio" ).datepicker();
		  $("#fechaFin" ).datepicker();
		  
		  
		  $( "#historial-cotizacion-form" ).dialog({
				autoOpen: false,
				width: 800,
				height:600,
				modal: true
				
			});
		  
	  });
	    </script>

    </head>
    <body>
        <div class="htContent">
            <div class="SmallHeader">
                  <%@ include file="header.jsp" %> 
            </div>
            <div class="contentIT">
    
        <!-- div>MENU</div--->
         <%@ include file="menu.jsp" %> 
                
                <div class="ITarea">
                    
                    <div class="ITareaSon">
                    
                        
		                       <div id="tabs">
          <!--ul>
             <li><a href="tabs-1">Busqueda de contratos</a></li>
           </ul-->   
             <div>
                  <div class="info">
                          <table align="center">
                                <tr>
                                    <td>Sucursal</td> 
                                    <td>
		                                    <select>
											  <option value="volvo">Volvo</option>
											  <option value="saab">Saab</option>
											  <option value="mercedes">Mercedes</option>
											  <option value="audi">Audi</option>
											</select> 
                                   </td>
                                   <td>Fecha inicio:</td>
                                   <td><input type="text" name="fechaInicio" id="fechaInicio"></td>
                                   <td><input type="radio" name="group2" value="Water"> Presupuestos<br></td>    
                                   <td><input type="checkbox" name="option3" value="Cheese"> Definitivos<br></td>    
                                </tr>
                                 <tr>
                                    <td>Filtrar por:</td>
                                    <td>
		                                    <select>
											  <option value="volvo">Volvo</option>
											  <option value="saab">Saab</option>
											  <option value="mercedes">Mercedes</option>
											  <option value="audi">Audi</option>
											</select> 
                                   </td>
                                   <td>Fecha fin:</td>
                                   <td><input type="text" name="fechaFin" id="fechaFin"></td>
                                   <td><input type="radio" name="group2" value="Water">Corizaciones<br></td>
                                   <td><input type="submit" value="Buscar"><br></td>
                                </tr>
                          </table>
                 
                  <div>
             </div>
                    
       </div>
       
       
       	<table align="center">
							<tr>
								<td>
									<table id="grid"></table>
									<div id="grid_detail"></div>
								</td>
							</tr>
	  </table>
						
	<input type="button" class="exel" value="Exportar a hoja de calculo">	<button id="historial-cotixacion">Historial</button>
		                    
		                    
		          
		              
		              
                             

                    </div>



                </div>




                <div class="clear"></div>
            </div>
            <div class="footer">
                <a>About Us</a>
                <a>Privacy Policies</a>
                <a>Terms of Use</a>
            </div>

        </div> 
    </body>
</html>


<div id="historial-cotizacion-form" title="Historial de cotizaciones">	
  <table width="743" border="1">
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td colspan="2">Mensaje</td>
  </tr>
  <tr>
    <td height="59" colspan="3">
         <table align="center">
									<tr>
										<td>
											<table id="grid_historialcotizacion"></table>
											<div id="grid_historialcotizacion"></div>
										</td>
									</tr>
			  </table>
    </td>
    <td colspan="2" rowspan="2" valign="top"><table width="200" border="1">
        <tr>
          <td colspan="3"><textarea name="textarea" rows="6"></textarea></td>
        </tr>
        <tr>
          <td>Nuevo</td>
          <td><input type="submit" name="Submit" value="Limpiar"></td>
          <td><input type="submit" name="Submit" value="Cancelar"></td>
        </tr>
          </table></td>
  </tr>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5"><table width="100%" border="1">
      <tr>
        <td width="91">Contacto</td>
        <td width="55"><input type="text" name="textfield"></td>
        <td width="33">&nbsp;</td>
        <td width="139">&nbsp;</td>
        <td width="56">&nbsp;</td>
      </tr>
      <tr>
        <td>Telefono</td>
        <td><input type="text" name="textfield"></td>
        <td>Email</td>
        <td><input type="text" name="textfield"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>Status</td>
        <td>Cotizado</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>Fecha</td>
        <td><input type="text" name="textfield"></td>
        <td>Hora</td>
        <td><input type="text" name="textfield"></td>
        <td><input type="submit" name="Submit" value="Agendar llamada"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td width="48">&nbsp;</td>
    <td width="72">&nbsp;</td>
    <td width="85">&nbsp;</td>
    <td width="1">&nbsp;</td>
    <td width="293">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5"><textarea name="textarea"></textarea></td>
  </tr>
  <tr>
    <td><input type="submit" name="Submit" value="Mostrar cotizacion"></td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
    <td><input type="submit" name="Submit" value="Salir"></td>
  </tr>
</table>

</div>



<script>
$("#grid").jqGrid({
    url:'seguimientosCotizacionesGrid.do',
    datatype: "json",
    width:1000,
colNames:['Num cotizacion','Fecha de cotizacion','Fomma de llegada','Tipo de cotizacion','Cliente nuevo','Cliente actual','Contacto'],
    colModel:[
    {
        name:'numeroCotizacion',
        index:'numeroCotizacion',
        sortable: true, 
        //hidden: true , 
        editable: true, 
        width:55
    }
    ,{
        name:'fechaCotizacion',
        index:'fechaCotizacion',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    },{
        name:'formadeLlegada',
        index:'formadeLlegada',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    },{
        name:'tipoCotizavion',
        index:'tipoCotizavion',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    },{
        name:'cteNuevo',
        index:'cteNuevo',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    },{
        name:'clienteActual',
        index:'clienteActual',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    },{
        name:'contacto',
        index:'contacto',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    }
    ],
    ondblClickRow: function(id_gerencia){
       // alert(bancoid)    
           
    },
    rowNum:10,
    rowList:[10,20,30],
    pager: '#grid_detail',
    sortname: 'id',
    viewrecords: true,
    sortable: true,
    sortorder: "desc",
    multiselect: false,
    caption:"Seguimiento de contratos y cotizaciones",
    loadonce : false,
    rowTotal: 'total',
    records:'records',
    jsonReader: {
        repeatitems: false,
        id: "id"
    }
});

$("#grid").jqGrid('navGrid','#grid_detail',{
    //edit:true,
    add:true,
    del:true,
    view :false,
    search: false 
},{closeAfterEdit:true,url:'cudCatalogoEstado.do?accion=edit'},{closeAfterAdd:true,url:'cudCatalogoEstado.do?accion=add'},{url:'cudCatalogoEstado.do?accion=del'});



/*Grid historial de cotizaciones*/
 $("#grid_historialcotizacion").jqGrid({
    url:'seguimientosCotizacionesGrid.do',
    datatype: "json",
    width:400,
colNames:['Num cotizacion','Fecha de cotizacion','Fomma de llegada','Tipo de cotizacion'],
    colModel:[
    {
        name:'numeroCotizacion',
        index:'numeroCotizacion',
        sortable: true, 
        //hidden: true , 
        editable: true, 
        width:55
    }
    ,{
        name:'fechaCotizacion',
        index:'fechaCotizacion',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    },{
        name:'formadeLlegada',
        index:'formadeLlegada',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    },{
        name:'tipoCotizavion',
        index:'tipoCotizavion',
        sortable: true, 
        editable: true,  
        editrules: { required: true},
        editoptions:{readonly: false},        
        width:55
    }
    ],
    ondblClickRow: function(id_gerencia){
       // alert(bancoid)    
           
    },
    rowNum:10,
    rowList:[10,20,30],
    pager: '#grid_historial_detail',
    sortname: 'id',
    viewrecords: true,
    sortable: true,
    sortorder: "desc",
    multiselect: false,
    caption:"",
    loadonce : false,
    rowTotal: 'total',
    records:'records',
    jsonReader: {
        repeatitems: false,
        id: "id"
    }
});

$("#grid_historialcotizacion").jqGrid('navGrid','#grid_historial_detail',{
    //edit:true,
    add:true,
    del:true,
    view :false,
    search: false 
},{closeAfterEdit:true,url:'cudCatalogoEstado.do?accion=edit'},{closeAfterAdd:true,url:'cudCatalogoEstado.do?accion=add'},{url:'cudCatalogoEstado.do?accion=del'});
/*Fin grid historial cotizaciones*/

$( "#historial-cotixacion" )
.button()
.click(function() {
	$( "#historial-cotizacion-form" ).dialog( "open");	
	$('#historial-cotizacion-form').dialog({
		width: 800,
		height: 600,
       
});
	
});




	</script>
	
	
